package com.wimcorp.magic.abilities.trigger;

import javax.persistence.Entity;

import com.wimcorp.magic.abilities.Ability;
@Entity
public class OnAttack extends AbilityTrigger{

	public OnAttack(){}
	
	public OnAttack(Ability ability){
		super(ability);
	}
	
	public OnAttack(OnAttack abilityTrigger) {
		super(abilityTrigger);
	}

	@Override
	public void register() {
		getAbility().getPlayer().getCombatPhase().registerAttackDeclareObserver(getAbility());
	}
	
	public void unRegister() {
		getAbility().getPlayer().getCombatPhase().unRegisterAttackDeclareObserver(getAbility());
	}
	
	public OnAttack clone() {
		return new OnAttack(this);
	}
	
}
